import React, { Component } from "react";
import "./style.css";
class OrderItem extends Component {
  render() {
      console.log(this.props.data)
      let { picture, product, shop, price, ifCommented } = this.props.data
    return (
      <div className="orderItem">
        <div className="orderItem__picCon">
          <img src={picture} className="orderItem__pic" alt="" />
        </div>
        <div className="orderItem__con">
          <div className="orderItem__left">
            <div className="orderItem__product">{product}</div>
            <div className="orderItem__shop">{shop}</div>
            <div className="orderItem__price">{price}</div>
          </div>
          <div className="orderItem__detail">
            <div>
                {ifCommented ? (<button className="orderItem__btn">已评价</button>): (<button className="orderItem__btn">评价</button>)}
            </div>
          </div>
        </div>
      </div>
    );
  }
}

export default OrderItem;
